const net = require('net')
const PORT = 3000;
const LOCAL = '127.0.0.1';
const client = net.createConnection({
    port:PORT,
    host:LOCAL
},function(){
    console.log('connected to server!');
    client.write('client world!\r\n');
})
client.on('data',function(d){
    console.log(d.toString())
})

client.on('end',function(){
    console.log('disconnected from server');
})